/*
 * Created on May 28, 2004
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package ro.gateway.aida.search;

/**
 * @author mihai
 * e-mail: mihai@ro-gateway.org
 */
public class StringCell extends ResultCell {
	protected String item;
	
	public StringCell(String type) {
		super(type);
	}
	
	public int compareTo(Object o) {
		StringCell s=(StringCell)o;	
		String c1=item!=null?item:"";
		String c2=s.getItem()!=null?s.getItem():"";
		return c1.compareTo(c2);
	}
	
	public String toString() {
		if(item==null) return super.toString();
		return item;
	}
	/**
	 * @return Returns the item.
	 */
	public String getItem() {
		return item;
	}
	/**
	 * @param item The item to set.
	 */
	public void setItem(String item) {
		this.item = item;
	}
}
